package com.mall.user.domain.model;

public record SellerName(String name) {
    public SellerName {
        //商家名称长度必须在3到20个字符之间
        if (name.length() < 3 || name.length() > 20) {
            throw new IllegalArgumentException("商家名称长度必须在3到20个字符之间");
        }
    }

    public static SellerName of(String name) {
        return new SellerName(name);
    }
}
